package com.ywk.pattern._1_simplefacory.simplefactory;

public class FactoryNoodles { // 生产客户需要的面条
	final static int TYPE_L = 1;
	final static int TYPE_P = 2;
	final static int TYPE_G = 3;

	public static Noodles getNoodles(int type) {
		switch (type) {
		case TYPE_L:
			return new LNoodles();
		case TYPE_P:
			return new PNoodles();
		case TYPE_G:
		default:
			return new GNoodles();
		}

	}

}
